package drivers;

import common.BlockInfo;
import common.Utils;
import server.ClientImpl;

import java.rmi.RemoteException;
import java.util.List;

public class ClientDriver2 {
    public static void main(String[] args) throws RemoteException {
        test1();
    }

    public static void test1() throws RemoteException {
        ClientImpl client = new ClientImpl(Utils.remoteIp,Utils.NN_PORT);
        try {
//            List<BlockInfo> out = client.put("test","test" , "goland-2021.3.2.exe");
            List<BlockInfo> out = client.put("test","test3" , "个人简历.docx");
            for (BlockInfo blockInfo : out) {
                System.out.println(blockInfo.getLocations());
            }
        } catch (RemoteException e) {
            e.printStackTrace();
        }
//        client.getFile("D:\\file\\uploads","b16b131bf937937b51358d54deebe72a232","hdfs-implementation//src//个人简历-dp.docx");
    }


}

